﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Perceiveit.Xml.Converters
{


    #region public class DoubleXConverter : XConverter<double>

    public class DoubleXConverter : XConverter<double>
    {
        public override double FromString(string value)
        {
            double v;
            if (string.IsNullOrEmpty(value) || !double.TryParse(value, out v))
                v = 0;

            return v;
        }

        public override string ToString(double value)
        {
            return value.ToString();
        }
    }

    #endregion

}
